From 97c44fa2f3486940b29b07f854855b18906fe69c Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Sat, 1 Apr 2006 11:08:50 +0100 Subject: [PATCH] Rename sched_op->sched_op_compat and sched_op_new->sched_op after Christian's interface cleanup. Signed-off-by: Keir Fraser --- xen/arch/ia64/vmx/vmx_hypercall.c | 6 +++--- xen/arch/ia64/vmx/vmx_ivt.S | 2 +- xen/arch/ia64/vmx/vmx_support.c | 2 +- xen/arch/ia64/xen/hypercall.c | 4 ++-- xen/arch/x86/hvm/io.c | 4 ++-- xen/arch/x86/x86_32/entry.S | 16 ++++++++-------- xen/arch/x86/x86_64/entry.S | 16 ++++++++-------- xen/common/schedule.c | 4 ++-- xen/include/public/sched.h | 6 +++--- xen/include/xen/hypercall.h | 7 ++++++- 10 files changed, 36 insertions(+), 31 deletions(-) diff --git a/xen/arch/ia64/vmx/vmx_hypercall.c b/xen/arch/ia64/vmx/vmx_hypercall.c index 4d35fea5d0..d07b7334e6 100644 --- a/xen/arch/ia64/vmx/vmx_hypercall.c +++ b/xen/arch/ia64/vmx/vmx_hypercall.c @@ -35,7 +35,7 @@ #include #include -extern long do_sched_op(int cmd, unsigned long arg); +extern long do_sched_op_compat(int cmd, unsigned long arg); extern unsigned long domain_mpa_to_imva(struct domain *,unsigned long mpaddr); void hyper_not_support(void) @@ -83,13 +83,13 @@ void hyper_dom_mem_op(void) } -void hyper_sched_op(void) +void hyper_sched_op_compat(void) { VCPU *vcpu=current; u64 r32,r33,ret; vcpu_get_gr_nat(vcpu,16,&r32); vcpu_get_gr_nat(vcpu,17,&r33); - ret=do_sched_op(r32,r33); + ret=do_sched_op_compat(r32,r33); vcpu_set_gr(vcpu, 8, ret, 0); vmx_vcpu_increment_iip(vcpu); diff --git a/xen/arch/ia64/vmx/vmx_ivt.S b/xen/arch/ia64/vmx/vmx_ivt.S index 71c22496cf..6bad61d067 100644 --- a/xen/arch/ia64/vmx/vmx_ivt.S +++ b/xen/arch/ia64/vmx/vmx_ivt.S @@ -1125,7 +1125,7 @@ hyper_call_table: data8 hyper_not_support //hyper_stack_switch data8 hyper_not_support //hyper_set_callbacks data8 hyper_not_support //hyper_fpu_taskswitch /* 5 */ - data8 hyper_sched_op + data8 hyper_sched_op_compat data8 hyper_dom0_op data8 hyper_not_support //hyper_set_debugreg data8 hyper_not_support //hyper_get_debugreg diff --git a/xen/arch/ia64/vmx/vmx_support.c b/xen/arch/ia64/vmx/vmx_support.c index 7e353be6c6..e5829817e3 100644 --- a/xen/arch/ia64/vmx/vmx_support.c +++ b/xen/arch/ia64/vmx/vmx_support.c @@ -43,7 +43,7 @@ void vmx_wait_io(void) do { if (!test_bit(port, &d->shared_info->evtchn_pending[0])) - do_sched_op(SCHEDOP_block, 0); + do_sched_op_compat(SCHEDOP_block, 0); /* Unblocked when some event is coming. Clear pending indication * immediately if deciding to go for io assist diff --git a/xen/arch/ia64/xen/hypercall.c b/xen/arch/ia64/xen/hypercall.c index f4d9d4e17e..971007cbf7 100644 --- a/xen/arch/ia64/xen/hypercall.c +++ b/xen/arch/ia64/xen/hypercall.c @@ -38,7 +38,7 @@ hypercall_t ia64_hypercall_table[] = (hypercall_t)do_ni_hypercall, /* do_stack_switch */ (hypercall_t)do_ni_hypercall, /* do_set_callbacks */ (hypercall_t)do_ni_hypercall, /* do_fpu_taskswitch */ /* 5 */ - (hypercall_t)do_ni_hypercall, /* do_sched_op */ + (hypercall_t)do_ni_hypercall, /* do_sched_op_compat */ (hypercall_t)do_dom0_op, (hypercall_t)do_ni_hypercall, /* do_set_debugreg */ (hypercall_t)do_ni_hypercall, /* do_get_debugreg */ @@ -160,7 +160,7 @@ fw_hypercall (struct pt_regs *regs) } else { pal_halt_light_count++; - do_sched_op(SCHEDOP_yield, 0); + do_sched_op_compat(SCHEDOP_yield, 0); } regs->r8 = 0; regs->r9 = 0; diff --git a/xen/arch/x86/hvm/io.c b/xen/arch/x86/hvm/io.c index 26339a0a74..893dd68ce5 100644 --- a/xen/arch/x86/hvm/io.c +++ b/xen/arch/x86/hvm/io.c @@ -713,7 +713,7 @@ void hvm_wait_io(void) if ( !test_bit(ARCH_HVM_IO_WAIT, &v->arch.hvm_vcpu.ioflags) ) break; - do_sched_op(SCHEDOP_block, 0); + do_sched_op_compat(SCHEDOP_block, 0); } /* @@ -743,7 +743,7 @@ void hvm_safe_block(void) if ( test_bit(port, &d->shared_info->evtchn_pending[0]) ) break; - do_sched_op(SCHEDOP_block, 0); + do_sched_op_compat(SCHEDOP_block, 0); } /* Reflect pending event in selector and master flags. */ diff --git a/xen/arch/x86/x86_32/entry.S b/xen/arch/x86/x86_32/entry.S index 86c609ce07..ff2a7991f3 100644 --- a/xen/arch/x86/x86_32/entry.S +++ b/xen/arch/x86/x86_32/entry.S @@ -579,19 +579,19 @@ ENTRY(setup_vm86_frame) addl $16,%esp ret -do_arch_sched_op: +do_arch_sched_op_compat: # Ensure we return success even if we return via schedule_tail() xorl %eax,%eax GET_GUEST_REGS(%ecx) movl %eax,UREGS_eax(%ecx) - jmp do_sched_op + jmp do_sched_op_compat -do_arch_sched_op_new: +do_arch_sched_op: # Ensure we return success even if we return via schedule_tail() xorl %eax,%eax GET_GUEST_REGS(%ecx) movl %eax,UREGS_eax(%ecx) - jmp do_sched_op_new + jmp do_sched_op .data @@ -624,7 +624,7 @@ ENTRY(hypercall_table) .long do_stack_switch .long do_set_callbacks .long do_fpu_taskswitch /* 5 */ - .long do_arch_sched_op + .long do_arch_sched_op_compat .long do_dom0_op .long do_set_debugreg .long do_get_debugreg @@ -647,7 +647,7 @@ ENTRY(hypercall_table) .long do_mmuext_op .long do_acm_op .long do_nmi_op - .long do_arch_sched_op_new + .long do_arch_sched_op .rept NR_hypercalls-((.-hypercall_table)/4) .long do_ni_hypercall .endr @@ -659,7 +659,7 @@ ENTRY(hypercall_args_table) .byte 2 /* do_stack_switch */ .byte 4 /* do_set_callbacks */ .byte 1 /* do_fpu_taskswitch */ /* 5 */ - .byte 2 /* do_arch_sched_op */ + .byte 2 /* do_arch_sched_op_compat */ .byte 1 /* do_dom0_op */ .byte 2 /* do_set_debugreg */ .byte 1 /* do_get_debugreg */ @@ -682,7 +682,7 @@ ENTRY(hypercall_args_table) .byte 4 /* do_mmuext_op */ .byte 1 /* do_acm_op */ .byte 2 /* do_nmi_op */ - .byte 2 /* do_arch_sched_op_new */ + .byte 2 /* do_arch_sched_op */ .rept NR_hypercalls-(.-hypercall_args_table) .byte 0 /* do_ni_hypercall */ .endr diff --git a/xen/arch/x86/x86_64/entry.S b/xen/arch/x86/x86_64/entry.S index c5249e1d79..6176188a85 100644 --- a/xen/arch/x86/x86_64/entry.S +++ b/xen/arch/x86/x86_64/entry.S @@ -488,19 +488,19 @@ nmi_in_hypervisor_mode: call do_nmi jmp ret_from_intr -do_arch_sched_op: +do_arch_sched_op_compat: # Ensure we return success even if we return via schedule_tail() xorl %eax,%eax GET_GUEST_REGS(%r10) movq %rax,UREGS_rax(%r10) - jmp do_sched_op + jmp do_sched_op_compat -do_arch_sched_op_new: +do_arch_sched_op: # Ensure we return success even if we return via schedule_tail() xorl %eax,%eax GET_GUEST_REGS(%r10) movq %rax,UREGS_rax(%r10) - jmp do_sched_op_new + jmp do_sched_op .data @@ -533,7 +533,7 @@ ENTRY(hypercall_table) .quad do_stack_switch .quad do_set_callbacks .quad do_fpu_taskswitch /* 5 */ - .quad do_arch_sched_op + .quad do_arch_sched_op_compat .quad do_dom0_op .quad do_set_debugreg .quad do_get_debugreg @@ -556,7 +556,7 @@ ENTRY(hypercall_table) .quad do_mmuext_op .quad do_acm_op .quad do_nmi_op - .quad do_arch_sched_op_new + .quad do_arch_sched_op .rept NR_hypercalls-((.-hypercall_table)/8) .quad do_ni_hypercall .endr @@ -568,7 +568,7 @@ ENTRY(hypercall_args_table) .byte 2 /* do_stack_switch */ .byte 3 /* do_set_callbacks */ .byte 1 /* do_fpu_taskswitch */ /* 5 */ - .byte 2 /* do_arch_sched_op */ + .byte 2 /* do_arch_sched_op_compat */ .byte 1 /* do_dom0_op */ .byte 2 /* do_set_debugreg */ .byte 1 /* do_get_debugreg */ @@ -591,7 +591,7 @@ ENTRY(hypercall_args_table) .byte 4 /* do_mmuext_op */ .byte 1 /* do_acm_op */ .byte 2 /* do_nmi_op */ - .byte 2 /* do_arch_sched_op_new */ + .byte 2 /* do_arch_sched_op */ .rept NR_hypercalls-(.-hypercall_args_table) .byte 0 /* do_ni_hypercall */ .endr diff --git a/xen/common/schedule.c b/xen/common/schedule.c index 9eaa29847f..4ab5d7d879 100644 --- a/xen/common/schedule.c +++ b/xen/common/schedule.c @@ -332,7 +332,7 @@ static long do_yield(void) return 0; } -long do_sched_op(int cmd, unsigned long arg) +long do_sched_op_compat(int cmd, unsigned long arg) { long ret = 0; @@ -365,7 +365,7 @@ long do_sched_op(int cmd, unsigned long arg) return ret; } -long do_sched_op_new(int cmd, GUEST_HANDLE(void) arg) +long do_sched_op(int cmd, GUEST_HANDLE(void) arg) { long ret = 0; diff --git a/xen/include/public/sched.h b/xen/include/public/sched.h index bebdb1c594..28e86c0d76 100644 --- a/xen/include/public/sched.h +++ b/xen/include/public/sched.h @@ -13,17 +13,17 @@ /* * The prototype for this hypercall is: - * long sched_op_new(int cmd, void *arg) + * long sched_op(int cmd, void *arg) * @cmd == SCHEDOP_??? (scheduler operation). * @arg == Operation-specific extra argument(s), as described below. * - * **NOTE**: - * Versions of Xen prior to 3.0.2 provide only the following legacy version + * Versions of Xen prior to 3.0.2 provided only the following legacy version * of this hypercall, supporting only the commands yield, block and shutdown: * long sched_op(int cmd, unsigned long arg) * @cmd == SCHEDOP_??? (scheduler operation). * @arg == 0 (SCHEDOP_yield and SCHEDOP_block) * == SHUTDOWN_* code (SCHEDOP_shutdown) + * This legacy version is available to new guests as sched_op_compat(). */ /* diff --git a/xen/include/xen/hypercall.h b/xen/include/xen/hypercall.h index 23f9b48e92..cb8b9610ff 100644 --- a/xen/include/xen/hypercall.h +++ b/xen/include/xen/hypercall.h @@ -18,10 +18,15 @@ do_ni_hypercall( void); extern long -do_sched_op( +do_sched_op_compat( int cmd, unsigned long arg); +extern long +do_sched_op( + int cmd, + GUEST_HANDLE(void) arg); + extern long do_dom0_op( GUEST_HANDLE(dom0_op_t) u_dom0_op); -- 2.30.2